package com.itheima.d0_homework.timu3;

import java.util.Arrays;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入要添加商品的价格");
        double price = scanner.nextDouble();

        double[] oldPrice = {23.6,34.4,35.3,36.2,78.8,89.6,100.3};
        double [] newPrice = new double[oldPrice.length+1];

        System.arraycopy(oldPrice,0,newPrice,0,oldPrice.length);
        newPrice[newPrice.length-1] = price;
        Arrays.sort(newPrice);
        System.out.println(Arrays.toString(newPrice));
    }
}
